{% extends "base_sub.html" %}
{% import "/sideview/macros.html" as sideview %}

{% block title %}{{ member.mb_nick }}自我介绍{% endblock title %}

{% block content %}
<div id="profile" class="new_win">
    <h1 id="win_title">{{ member.mb_nick }}您的个人资料</h1>
    <div class="profile_name">
        <span class="my_profile_img">
            <img src="{{ get_member_image(member.mb_id) }}" alt="{{ member.mb_nick }}">
        </span>
        {{ sideview.get(request, member.mb_id, member.mb_name, member.mb_email, member.mb_homepage)|safe }}
    </div>
    <div class="tbl_head02 tbl_wrap new_win_con">
        <table>
            <tbody>
            <tr>
                <th scope="row"><i class="fa fa-regular fa-star" aria-hidden="true"></i> 成员权力</th>
                <td>{{ member.mb_level }}</td>
                <th scope="row"><i class="fa fa-database" aria-hidden="true"></i> 点</th>
                <td>{{ member.mb_point|number_format }}</td>
            </tr>
            <tr>
                <th scope="row"><i class="fa fa-regular fa-clock" aria-hidden="true"></i> 会员天数</th>
                <td>
                    {% if request.state.login_member and request.state.login_member.mb_level >= member.mb_level %}
                        {{ member.mb_datetime|datetime_format("%Y-%m-%d") }}
                        ({{ days_since_regist }} 工作)
                    {% else %}
                        未知
                    {% endif %}

                </td>
                <th scope="row"><i class="fa fa-regular fa-clock" aria-hidden="true"></i> 最终访问</th>
                <td>
                    {% if request.state.login_member and request.state.login_member.mb_level >= member.mb_level %}
                        {{ member.mb_today_login|datetime_format("%Y-%m-%d") }}
                    {% else %}
                        未知
                    {% endif %}
                </td>
            </tr>
            {% if member.mb_homepage %}
            <tr>
                <th scope="row"><i class="fa fa-home" aria-hidden="true"></i> 主页</th>
                <td colspan="3"><a href="{{ member.mb_homepage }}" target="_blank">{{ member.mb_homepage }}</a></td>
            </tr>
            {% endif %}
            </tbody>
        </table>

        <section>
            <h2>问候语</h2>
            <p>{{ member.mb_profile or "没有介绍内容." }}</p>
        </section>
    </div>
    <div class="win_btn">
        <button type="button" onclick="window.close();" class="btn_close">窗口关闭</button>
    </div>
</div>
{% endblock content %}